<?php
	require_once("web_fns.php");
	if (!session_id()) session_start();
	if(!isset($_SESSION['user_id'])) {
		echo 2;
	}
	else {
		$img_src = $_POST['img_src'];
		$check_result = change_portrait($users_info,$_SESSION['user_id'],$img_src);
		if($check_result==1) {
			echo 1;
		}
		else
		echo 0;
	}
?>